using CookComputing.XmlRpc;

namespace CKS.EBE.API
{
    public interface IMetaWeblogApi
    {
        // Methods
        [return: XmlRpcReturnValue(Description = "True if deleted sucessfully")]
        [XmlRpcMethod("blogger.deletePost", Description = "Deletes a post.")]
        bool deletePost(string appKey, string postid, string username, string password, [XmlRpcParameter(Description = "If applicable, this specifies whether the weblog should be republished after the post has been deleted.")] bool publish);

        [XmlRpcMethod("metaWeblog.editPost", Description = "Updates an existing post. Returns true if successful.")]
        bool editPost(string postid, string username, string password, MetaWeblog.Post post, bool publish);
        
        [XmlRpcMethod("metaWeblog.getCategories", Description = "Retrieves a list of available categories for a post. Returns an array of details.")]
        MetaWeblog.CategoryDetails[] getCategories(string blogid, string username, string password);
        
        [XmlRpcMethod("metaWeblog.getPost", Description = "Retrieves an existing post. Returns the Post structure.")]
        MetaWeblog.Post getPost(string postid, string username, string password);
        
        [XmlRpcMethod("metaWeblog.getRecentPosts", Description = "Retrieves a list of the most recent posts. Returns an array of Posts.")]
        MetaWeblog.Post[] getRecentPosts(string blogid, string username, string password, int numberOfPosts);
        
        [XmlRpcMethod("blogger.getUserInfo", Description = "Returns information about the specified user.")]
        MetaWeblog.UserDetails getUserInfo(string appKey, string username, string password);
        
        [XmlRpcMethod("blogger.getUsersBlogs", Description = "Returns details on all the blogs the specified user owns.")]
        MetaWeblog.BlogDetails[] getUsersBlogs(string appKey, string username, string password);
        
        [XmlRpcMethod("metaWeblog.newMediaObject", Description = "Creates a new media object (image) and returns the URL")]
        MetaWeblog.MediaObjectDetails newMediaObject(string blogid, string username, string password, MetaWeblog.MediaObject mediaObject);
        
        [XmlRpcMethod("metaWeblog.newPost", Description = "Creates a new blog. Returns the item ID as a string.")]
        string newPost(string blogid, string username, string password, MetaWeblog.Post post, bool publish);
    }
}
